<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

if ( ! function_exists('role'))
{
	function role($key='',$val='')
	{
		$role['WK'] = 'Wicket Keeper';
		$role['BW'] = 'Bowler';
		$role['BT'] = 'Batsman';
		$role['AR'] = 'All Rounder';
		if($key){
			
		return	$role[$key];
			
		}elseif($val){
		
			foreach($role as $k => $v)
			{
				if($v == $val){
					
					return 	$k ;
				}
				
			}
			
			
		}else{
			
		return $role;
		
		}
		
	}
}